<nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
    <div class="navbar-header">
        <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
        <form role="search" class="navbar-form-custom" method="get" action="">
            <div class="form-group">
                <input type="text" placeholder="输入搜索..." class="form-control" name="search" id="top-search">
            </div>
        </form>
    </div>
    <ul class="nav navbar-top-links navbar-right">
        <li>
            {% if message_num > 0 %}
            <a href="{% url 'message_list' %}" style="font-size:13px; font-weight:normal; color: red">
                <i class="fa fa-bell"></i>(<label id="unread_count" type="text">{{ message_num }}</label>)
            </a>
            {% else %}
                <a href="{% url 'message_list' %}" style="font-size:13px; font-weight:normal;">
                <i class="fa fa-bell"></i>
            </a>
            {% endif %}
        </li>
        <li>
            <a href="{% url 'logout' %}">
                <i class="fa fa-sign-out"></i> Log out
            </a>
        </li>
    </ul>
</nav>